<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:if test="${param['page'] eq 'saleProML'}">
	<marquee direction="up" onmouseover="this.stop()" onmouseout="this.start()"  SCROLLAMOUNT="5" scrolldelay="90" height="235" style="text-align:center;">
		<s:iterator value="salestproducts">
			<img src='<s:property value="imageUrl" />' width="150px" height="200px"/><br /><b><s:property value="productName" /></b><br /><br />
		</s:iterator>
	</marquee> 
</c:if>




<c:if test="${param['page'] eq 'topSalePro'}">
	<table width="100%" style="margin: auto;text-align:center;" >  
	<tr class="title-content" >
		<td colspan="3"><h2>Sản Phẩm Bán Chạy</h2></td>
	</tr>
	<s:iterator value="salestproducts" status="product" >
	<s:if test="#product.index==0 || #product.index==3" >	
		${"<tr>"}
	</s:if>
			<td>
				<table width="100%" style="border-right:dotted 1px white;border-bottom:dotted 1px white;">
					<tr>
						<td><br/><br/><img src='<s:property value="imageUrl" />' width="200px" height="250px"/></td>
					</tr>
					<tr>
						<td><b><s:property value="productName" /></b></td>
					</tr>
					<tr>
						<td><b><s:property value="productSerial" /></b><br/></td>
					</tr>
				</table>
			</td>
			 
	<s:if test="#product.index==2 || #product.index==5" >			
		${"</tr>"}
	</s:if>
	
	</s:iterator>
	</table>
	<br/><br/><br/>
</c:if>



<c:if test="${param['page'] eq 'topNewPro'}">
	<table width="100%" style="margin: auto;text-align:center;" >  
		<tr class="title-content" >
			<td colspan="3"><h2>Sản Phẩm mới</h2></td>
		</tr>
	<s:iterator value="newstProducts" status="product" > 
	<s:if test="#product.index==0 || #product.index==3" >	
		${"<tr>"}
	</s:if>
			<td>
				<table width="100%" style="border-right:dotted 1px white;border-bottom:dotted 1px white;">
					<tr>
						<td><br/><br/><img src='<s:property value="imageUrl" />' width="200px" height="250px"/></td>
					</tr>
					<tr>
						<td><b><s:property value="productName" /></b></td>
					</tr>
					<tr>
						<td><b><s:property value="productSerial" /></b><br/></td>
					</tr>
				</table>
			</td>
	<s:if test="#product.index==2 || #product.index==5" >			
		${"</tr>"} 
	</s:if>
	
	</s:iterator>
	</table>
</c:if>

<c:if test="${(param['page'] eq 'proBusyA') or (param['page'] eq 'proStopSellingA') }">
	<table width="100%" style="margin: auto;text-align:center;" >  
	
	<c:if test="${(param['page'] eq 'proBusyA') }">
	<tr class="title-content" >
		<td colspan="3"><h2>Danh sách sản phẩm có hàng trong kho</h2></td>
	</tr>
	</c:if>
	
	<c:if test="${(param['page'] eq 'proStopSellingA') }">
	<tr class="title-content" >
		<td colspan="3"><h2>Danh sách sản phẩm hết hàng</h2></td>
	</tr>
	</c:if>
	
	<tr>
		<td>
			<table width="100%" class="list-table">
				<tr > 
					<td width="100px" height="20px" ><b>Mã sản phẩm</b></td>
					<td width="400px"><b>Tên sản phẩm</b></td>
					<td width="100px"><b>Số lượng đã bán</b></td>
					<td><b>Sửa</b></td>
					<td><b>Xóa</b></td>
				</tr>
				<s:iterator value="listProduct">
				<tr>
					<td height="20px"><s:property value="productID" /></td>
					<td><s:property value="productName" /></td>
					<td><s:property value="quantitySale" /></td>
					<td><a href="#"><img src="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}//images/edit.png" /></a></td>
					<td><a href="#"><img src="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}//images/delete.png" /></a></td>
				</tr>
				</s:iterator>
				
			</table>
		</td>
	</tr>
	</table>
	<br/><br/><br/>
</c:if>











